package me.ereach.lambdas;

import java.util.function.Function;

public class MainFunction {
    public static void main(String[] args) {
        Function<String, Integer> map = str -> str.length();
        System.out.println(map.apply("Hello, World"));

        Function<String, String> replaceColon = str -> str.replace(":", "=");
        Function<String, String> addBraces = str -> "{" + str + "}";
        System.out.println(replaceColon.andThen(addBraces).apply("name:jinzd"));
    }
}
